<?php 
if(isset($_SESSION['config_template']))
{
	if($_SESSION['config_template']=='layoutmain_web1')
	{
		?>
		<link rel="stylesheet" type="text/css" href="/css/web1/contact.css" media="all">
		<script language="javascript" type="text/javascript" src="/js/contact.js"></script>	
		<div class="page-title">
			<input type="hidden" id="text_lang" value="<?php echo $text_lang;?>"/>
			<h1><?php echo $title;?><?php if(isset($permission) && $permission=="true") {?>
				<!-- Tạo cây bút chì cho click and change -->
				<div style="float:right;">
				<ul class="gallery clearfix">
					<a href="/contactform/clickchange?iframe=true&width=370&height=185" rel="prettyPhoto[iframe]">
						<img src="/images/Pencil.png" style="width:20px ; height:20px;margin-left:25px; margin-top:0px;"></img>
					</a>
				</ul>
				</div>
				<!-- End - Tạo cây bút chì cho click and change -->
				<?php } ?></h1>
		</div>
		<div id="contact_show">
			<input type="hidden" id="hdnFlag" name="hdnFlag" value="<?php if(isset($flag)) echo $flag; ?>" />
		</div>
		<form id="contact_form" name="contact_form" action="" method="POST" enctype="multipart/form-data" onsubmit="return checkinput()">
		<div class="fieldset">
			<ul class="form-list">
				<li class="fields">
					<div class="field">
						<label class="required" for="name"><em>*</em><?php echo $text_name; ?> :</label>
						<br /><span class="contact_error" id="fullname_error"></span>
						<div class="input-box">
							<input type="text" class="input-text required-entry" value="<?php if(isset($fullname)) echo $fullname; ?>" id="fullname" name="fullname">
						</div>
					</div>
					<div class="field">
						<label class="required" for="email"><em>*</em><?php echo $text_email; ?> </label>
						<br /><span class="contact_error" id="email_error"></span>
						<div class="input-box">
							<input type="text" class="input-text required-entry validate-email" value="<?php if(isset($email)) echo $email; ?>"  id="email" name="email">
						</div>
					</div>
				</li>
				<li>
					<div class="field">
						<label for="telephone"><?php echo $text_title; ?> </label>
						<br /><span class="contact_error" id="subject_error"></span>
						<div class="input-box">
							<input type="text" class="input-text" value="<?php if(isset($subject)) echo $subject; ?>"  id="subject" name="subject">
						</div>
					</div>
					<div class="field">
						<label class="required" for="capchacode"><em>*</em><?php echo $text_enter; ?> </label>
						<span class="contact_error" id="captcha_error"><?php if(isset($captchaError) && $captchaError==false) echo $text_captcha_test; ?></span>
						<div class="input-box">
							<input type="text" class="input-text" value="" id="captcha" name="captcha">
						</div>
					</div>
				</li>
				<li class="wide">
					<div class="field">
						<label class="required" for="comment"><em>*</em><?php echo $text_content; ?></label>
						<br /><span class="contact_error" id="message_error"></span>
						<div class="input-box">
							<textarea rows="3" cols="5" class="required-entry input-text" id="message" name="message"><?php if(isset($message)) echo $message; ?></textarea>
						</div>
					</div>
					<div class="field">
						<label for="comment"><?php echo $text_captcha; ?> : </label>
						<input type="hidden" id="hdnCaptcha" name="hdnCaptcha" value="<?php echo $captchaID?>" />
						<div class="contact_input">
								<div style="width:160px; height:50px; float:left;">
									<a style="cursor:pointer" onclick="captcha()"><img src="<?php echo "/captcha/images/".$captchaID.".jpg"?>" id="captchaShow"></a>
								</div>
								<div style="width:28px; height:30px; margin-left:10px; margin-top:10px; float:left;">
									<a style="cursor:pointer" onclick="captcha()"><img style="width:28px; height:30px; border:0;" src="/images/ResetButton.png" id="captchaShow"></a>
								</div>
						</div>
					</div>
				</li>
			</ul>
		</div>
		<div style="padding-top:10px;margin-top:10px" class="buttons-set">
			<p class="required"> <?php  echo $text_require; ?> * <?php  echo $text_require1; ?> </p>
			<button class="button" title="Submit" type="submit" ><span><span><?php echo $text_btn_send; ?></span></span></button>
		</div>
		</form>
	<?php 
	}
	else 
	{
		if($_SESSION['config_template']=='layoutmain_web2')
		{?>
		<link rel="stylesheet" type="text/css" href="/css/contact.css" />
		<script language="javascript" type="text/javascript" src="/js/contact.js"></script>
			<!--Contact-->
			<div class="page-title">
			<input type="hidden" id="text_lang" value="<?php echo $text_lang;?>"/>
			    <h1><span style="color: #EA2E9D;font-size: 24px;"><?php echo $title;?></span>
				<?php if(isset($permission) && $permission=="true") {?>
				<!-- Tạo cây bút chì cho click and change -->
				<div style="float:right;">
				<ul class="gallery clearfix">
					<a href="/contactform/clickchange?iframe=true&width=370&height=185" rel="prettyPhoto[iframe]">
						<img src="/images/Pencil.png" style="width:20px ; height:20px;margin-left:25px; margin-top:0px;"></img>
					</a>
				</ul>
				</div>
				<!-- End - Tạo cây bút chì cho click and change -->
				<?php } ?>		    
			    </h1>
			</div>
			<div id="contact_show">
				<input type="hidden" id="hdnFlag" name="hdnFlag" value="<?php if(isset($flag)) echo $flag; ?>" />
			</div>
			<form id="contact_form" name="contact_form" action="" method="POST" enctype="multipart/form-data" onsubmit="return checkinput()">
			    <div class="fieldset" style="height:auto;">
			        <h2 class="legend"><?php  echo $text_require; ?> (<span class="star" style="font-size:12px !important">*</span>) <?php  echo $text_require1; ?></h2>
			        <ul class="form-list">
			            <li class="fields">
			                <div class="field">
			                    <label class="required" for="name"><em>*</em><?php echo $text_name; ?> : </label>
			                    <br /><span class="contact_error" id="fullname_error"></span>
			                    <div class="input-box">
			                        <input type="text" class="input-text required-entry"  name="fullname" id="fullname" value="<?php if(isset($fullname)) echo $fullname; ?>">
			                    </div>
			                </div>
							
			                <div class="field">
			                    <label for="captcha"><?php echo $text_captcha; ?> : </label>
			                    <input type="hidden" id="hdnCaptcha" name="hdnCaptcha" value="<?php echo $captchaID?>" />
								<div style="width:160px; height:50px; float:left; clear:both">
			                        <a onclick="captcha()" style="cursor:pointer"><img id="captchaShow" src="<?php echo "/captcha/images/".$captchaID.".jpg"?>" /></a>
			                    </div>
			                    <div style="width:28px; height:30px; margin-left:10px; margin-top:10px; float:left;">
			                        <a onclick="captcha()" style="cursor:pointer"><img id="captchaShow" src="/images/web2/ResetButton.png" style="width:28px; height:30px; border:0;"/></a>
			                    </div>
			                </div>
			            </li>
			            <li class="fields">
							<div class="field">
								<label class="required" for="email"><em>*</em><?php echo $text_email; ?></label>
								<br /><span class="contact_error" id="email_error"></span>
								<div class="input-box">
									<input type="text" class="input-text required-entry validate-email" name="email" id="email" value="<?php if(isset($email)) echo $email; ?>">
								</div>
							</div>
							
							<div class="field">
								<label class="required" for="email"><em>*</em><?php echo $text_enter; ?></label>
								<br /><span class="contact_error" id="captcha_error"><?php if(isset($captchaError) && $captchaError==false) echo $text_captcha_test; ?></span>
								<div class="input-box">
									<input type="text" class="input-text required-entry validate-email" value="" name="captcha" id="captcha">
								</div>
							</div>
			            </li>
						<li>
							<label class="required" for="title"><em>*</em><?php echo $text_title; ?></label>
							<br /><span class="contact_error" id="subject_error"></span>
							<div class="input-box">
								<input type="text" class="input-text" name="subject" id="subject"" value="<?php if(isset($subject)) echo $subject; ?>">
							</div>
						</li>
			            <li class="wide">
			                <label class="required" for="content"><em>*</em><?php echo $text_content; ?></label>
			                <br /><span class="contact_error" id="message_error"></span>
			                <div class="input-box">
			                    <textarea rows="3" cols="5" class="required-entry input-text" title="content" id="message" name="message"><?php if(isset($message)) echo $message; ?></textarea>
			                </div>
			            </li>
			        </ul>
			    </div>
			    <div class="buttons-set">
			        <button class="button" title="Submit" type="submit"><span><span><?php echo $text_btn_send; ?></span></span></button>
			    </div>
			</form>
			<!--End Contact-->		
		
	<?php }
		else 
	{?>			
<link rel="stylesheet" type="text/css" href="/css/contact.css" />
<script language="javascript" type="text/javascript" src="/js/contact.js"></script>

<div>		
<input type="hidden" id="text_lang" value="<?php echo $text_lang;?>"/>
				<p><?php echo $title; ?></p>
				<?php if(isset($permission) && $permission=="true") {?>
				<!-- Tạo cây bút chì cho click and change -->
				<ul class="gallery clearfix">
					<a href="/contactform/clickchange?iframe=true&width=370&height=185" rel="prettyPhoto[iframe]">
						<img src="/images/Pencil.png" style="width:20px ; height:20px;margin-left:25px; margin-top:0px;"></img>
					</a>
				</ul>
				<!-- End - Tạo cây bút chì cho click and change -->
				<?php } ?>
				<div class="line"><hr></div><br/>
				<div id="contact_show">
					<input type="hidden" id="hdnFlag" name="hdnFlag" value="<?php if(isset($flag)) echo $flag; ?>" />
				</div>
				<div id="contact_content">
					<i class="guide"><?php  echo $text_require; ?> (<span class="star" style="font-size:12px !important">*</span>) <?php  echo $text_require1; ?> </i>
					<form id="contact_form" name="contact_form" action="" method="POST" enctype="multipart/form-data" onsubmit="return checkinput()">
						<div class="contact_name" >
               				<b class="labeltxt"><?php echo $text_name; ?> : <span class="star"> * </span></b>
               				<span class="contact_error" id="fullname_error"></span>
        				</div>
				        <div class="contact_input" >
				            <input class="input-text" type="text" name="fullname" id="fullname" value="<?php if(isset($fullname)) echo $fullname; ?>"/>
				        </div>
				
				        <div class="contact_name" >
				            <b class="labeltxt"><?php echo $text_email; ?>  <span class="star"> * </span></b>
				            <span class="contact_error" id="email_error"></span>
				        </div>
				        <div class="contact_input" >
				            <input class="input-text" type="text" name="email" id="email" value="<?php if(isset($email)) echo $email; ?>"/>
				        </div>
				
				        <div class="contact_name" >
				        	<b class="labeltxt"><?php echo $text_title; ?>  <span class="star"> * </span></b>
				        	<span class="contact_error" id="subject_error"></span>
				        </div>
				        <div class="contact_input" >
				        	<input class="input-text" type="text" name="subject" id="subject"" value="<?php if(isset($subject)) echo $subject; ?>"/>
				        </div>
				
				        <div class="contact_name" >
				            <b class="labeltxt"><?php echo $text_content; ?>  <span class="star"> * </span></b>
				            <span class="contact_error" id="message_error"></span>
				        </div>
				        <div class="contact_input" >
				            <textarea class="input-message" id="message" name="message"  cols="70" rows="5"><?php if(isset($message)) echo $message; ?></textarea>
				        </div>
				        
				        <div class="contact_name" >
				            <b class="labeltxt"><?php echo $text_captcha; ?> : </b>
				            <input type="hidden" id="hdnCaptcha" name="hdnCaptcha" value="<?php echo $captchaID?>" />
				        </div>
				        <div class="contact_input" >
				        	<div style="width:160px; height:50px; float:left;">
                                <a onclick="captcha()" style="cursor:pointer"><img id="captchaShow" src="<?php echo "/captcha/images/".$captchaID.".jpg"?>"/></a>
                            </div>
                            <div style="width:28px; height:30px; margin-left:10px; margin-top:10px; float:left;">
                                <a onclick="captcha()" style="cursor:pointer"><img id="captchaShow" src="/images/ResetButton.png" style="width:28px; height:30px; border:0;"/></a>
                            </div>
				        </div>
				        
				        <div class="contact_name" >
				        	<b class="labeltxt"><?php echo $text_enter; ?>  <span class="star"> * </span></b>
				        	<span class="contact_error" id="captcha_error"><?php if(isset($captchaError) && $captchaError==false) echo $text_captcha_test; ?></span>
				        </div>
				        <div class="contact_input" >
				        	<input class="input-text" type="text" name="captcha" id="captcha"" value=""/>
				        </div>
				        
				        <div class="contact_name" >
				        	<input type="submit" id="createUser" name="createUser" value="<?php echo $text_btn_send; ?> " class="btnUser" />
				        </div>
				        
					</form>
				</div>
</div>
<?php }
	}
}?>	
<div style="clear: both;"></div>
